<template>
	<view>
		<view class="box">

			<h1>
				<image src="../../static/chenggong.png" style="width: 100px; height: 100px;" mode=""></image>
				<p>支付成功</p>
			</h1>

		</view>
		<view style="height: 160px;"></view>
		<button open-type="share" v-bind:data-student="item" class="share">分享给司机</button>
		<!-- <button style="margin-top: 20px;">返回合同页面</button> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				share_id: "",
				type: "",
			}
		},
		onLoad(open) {
			this.share_id = open.id;
			this.type = open.type;
			this.goToIndex();
		},
		onShareAppMessage(event) {
			console.log(event);
			return {
				title:"分享给司机",
				// path: "/pages/index/index?id=" + this.share_id,
				path: "/pages/index/tianxiexinxiAB?share_id=" + this.share_id + "&type=2",
				// imageUrl: "../../../static/images/share/share_report.png",
			}

		},
	methods: {
		goToIndex(){
			// 如果是司机 type=2 
			if (this.type == 2) {
				// 跳转到首页
				uni.reLaunch({
					url:"/pages/index/index",
				})
			}
		}

	}
	}
</script>

<style scoped>
	button {
		width: 90%;
		margin: 0 auto;
		height: 50px;
		background: #1890FF;
		box-shadow: 0px 0px 4px 0px rgba(204, 204, 204, 0.5);
		border-radius: 25px;
		font-size: 18px;
		font-weight: 600;
		color: #FFFFFF;
	}

	.box {
		overflow: hidden;
	}

	.box>h1 {
		margin-top: 95px;
		text-align: center;

		font-size: 18px;
		font-weight: 600;
	}

	.box>p {
		width: 90%;
		margin: 0 auto;
		display: flex;
		align-items: center;
	}
</style>
